import {Component} from "@angular/core";
import {NavController} from "ionic-angular";
import {ActivityAddPage} from "../activity/add/add";
@Component({
  selector: 'home',
  templateUrl: 'home.html'
})
export class HomePage {
  map: any;

  constructor(public navCtrl: NavController) {
    this.initMap();
  }

  initMap() {
    setTimeout(function () {
      //初始化地图
      this.map = new AMap.Map('container', {
        resizeEnable: true,
        zoom: 11,
        center: [116.397428, 39.90923]
      });
    }, 1);
  }

  addActivity(){
    this.navCtrl.push(ActivityAddPage);
  }

}
